package com.da.javatest.leetCode;

/**
 * @author chenlida
 * @date 2019/3/14 11:29
 * @description
 */
public class Code58 {
    public int lengthOfLastWord(String s) {
        String[] s1 = s.split(" ");
        if (s1.length < 1) {
            return 0;
        }
        return s1[s1.length - 1].length();
    }
}
